﻿using System;
using Ct.StudentProject.Myself;
using Ct.StudentProject.Data;
using CtCommon.Utility;
using CtCommon.Utility.Result;

namespace Ct.StudentProject.console
{
    class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("请输入Json语句");
            string JsonText = Console.ReadLine();
            student user = JsonText.JSONDeserialize<student>();

            try
            {

                string msg = string.Empty;
                Deliver del = new Deliver();

                bool isvaild = del.VerifyAndDeliver(user, out msg);

                if (isvaild)
                {
                   // MessageBox.Show(msg);
                    Console.WriteLine(msg);
                }
                else
                {
                    msg = string.Empty;
                    StudentDatabase db = new StudentDatabase();
                    if (db.InsertStudent(user) == true)
                    {                      
                        Console.WriteLine("ID为" );

                        db.QueryStudent(user,out msg);
                    }
                }
                CtResult<StudentDatabase> result = new CtResult<StudentDatabase>();
                result.Code = 0;
                result.Message = "";
                result.Data = db;
                result.js
            }
            catch
            {

            }
        }
    }
}
